package com.burgeon.backend.college.control_panel.entity;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * 考题
 */
@Data
public class ExamItem implements Serializable {
    private static final long serialVersionUID = 7865863262293334251L;
    private String id;

    private String examId; //考试id
    @NotBlank(message = "缺少试题题目,请检查")
    @Length(message = "题目不能超过个 {max}或小于{min} 字符", max = 200 ,min = 2)
    private String title;//题目

    private List<Option> options;//选项

    @NotBlank(message = "缺少试题分数,请检查")
    @Range(message = "每题分数范围为 {min} 到 {max} 之间", min = 1, max = 100)
    private int score ;//分数

    private String strScore;//分数字符串

    @NotBlank(message = "缺少试题答案,请检查")
    private String result;//答案

    private int num;
}
